<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss2">
    <title>详情</title>
</head>
<body>

<div class="layui-fluid">

    <div class="layui-card">
        <div class="layui-card-body">
            <form method="post" action="" class="layui-form" lay-filter="zmn-form">
                <input type="hidden" name="contractId" th:value="${contractBorrowRecordVO.contractId}">
                <input type="hidden" name="borrowFile" th:value="${contractBorrowRecordVO.borrowFile}">
                <input type="hidden" name="fileSrc" th:value="${fileSrc}">

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">借阅文件：</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid">
                            <span th:text="${contractBorrowRecordVO.borrowFile}">borrowFile</span>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">借阅日期：</label>
                    <div class="layui-input-inline" style="width:180px">
                        <input type="text" id="borrowDay" name="borrowDay" placeholder="yyyy-MM-dd" class="layui-input"
                               th:value="${contractBorrowRecordVO.borrowDay}"
                               autocomplete="off" lay-verify="required"/>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">借阅人：</label>
                    <div class="layui-input-inline" id="borrower" style="width:180px">
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">所属管理中心和部门：</label>
                    <div class="layui-input-inline" style="width:160px">
                        <select lay-filter="oneDeptId" id="oneDeptId" name="borrowerDeptOneId" lay-search lay-verify="required">
                            <option value=""></option>
                            <option th:each="dept:${oneDepts}" th:value="${dept.deptId}" th:selected="${dept.deptId == contractBorrowRecordVO.borrowerDeptOneId}" th:text="${dept.deptName}"/>
                        </select>
                    </div>
                    <div class="layui-input-inline" style="width:160px">
                        <select id="deptId" name="borrowerDeptTwoId" lay-search>
                            <option value=""></option>
                            <option th:each="dept:${twoDepts}" th:value="${dept.deptId}" th:selected="${dept.deptId == contractBorrowRecordVO.borrowerDeptTwoId}" th:text="${dept.deptName}"/>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label layui-form-required">借阅原因：</label>
                    <div class="layui-input-block" style="width: 330px">
                        <div class="layui-inline">
                            <textarea lay-verify="required" style="width: 330px" name="borrowReason" class="layui-textarea" th:text="${contractBorrowRecordVO.borrowReason}" maxlength="80"></textarea>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item submit">
                    <div class="layui-input-block">
                        <button th:if="${#authPermit.checkPermit('/contract/borrow/record/addEdit.action')}" class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">提交</button>
                        <button class="layui-btn layui-btn-primary" id="cancel">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>

<script type="text/javascript" th:inline="javascript">
    var json = {
        contractBorrowRecordVO: [[${contractBorrowRecordVO}]],
        oneDepts: [[${oneDepts}]],
        twoDepts: [[${twoDepts}]]
    };

    layui.config({
        version: 20200218,
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        contract_borrow_record_detail_edit_js: "contract/borrow/record/zmn.plat.contract.borrow.record.detail.edit",
    }).use(['index', 'contract_borrow_record_detail_edit_js']);
</script>
</body>
</html>